package com.ruoyi.service.impl;

import com.ruoyi.domain.GoodsSkuInfo;
import com.ruoyi.mapper.GoodsSkuInfoMapper;
import com.ruoyi.service.IGoodsSkuInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsSkuInfoServiceImpl implements IGoodsSkuInfoService {
    @Autowired
    GoodsSkuInfoMapper goodsSkuInfoMapper;
    @Override
    public List<GoodsSkuInfo> list() {
        return goodsSkuInfoMapper.selectList();
    }

    @Override
    public List<GoodsSkuInfo> listForPage(GoodsSkuInfo goodsSkuInfo) {
        return goodsSkuInfoMapper.selectListForPage(goodsSkuInfo);
    }

    @Override
    public GoodsSkuInfo getById(Long id) {
        return goodsSkuInfoMapper.selectByPrimaryKey(id);
    }

    @Override
    public int save(GoodsSkuInfo goodsSkuInfo) {
        return goodsSkuInfoMapper.insertSelective(goodsSkuInfo);
    }

    @Override
    public int updateById(GoodsSkuInfo goodsSkuInfo) {
        return goodsSkuInfoMapper.updateByPrimaryKeySelective(goodsSkuInfo);
    }

    @Override
    public int removeByIds(Long[] ids) {
        return goodsSkuInfoMapper.deleteByPrimaryKeys(ids);
    }
}
